dojo.provide("dojot.widget.Hello")
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");

dojo.declare("dojot.widget.Hello",[dijit._Widget,dijit._Templated],{
	templatePath: dojo.moduleUrl("dojot.widget", "resources/Hello.html"),
	//templateString:"<div id='hello'>${greeting}</div>",
	greeting:"hello nana",
	foo:"foo 2",
	baz:"",
	changeColor:null,
	postMixInProperties:function(){
		//this.inherited(arguments);
		console.log("abc");
		console.log("postMixInProperties: foo[1]=" , this.foo);
		console.log("postMixInProperties: bar[1]=" , this.baz[1]);
	},
	constructor:function(){
		arguments["foo"];
		console.log(arguments[0]);
		console.log("constructor foo :" + this.foo+"--"+arguments[1].id);
		console.log("constructor greeting :" + this.greeting);
		
		
	},
	postCreate:function(){
		console.log("postCreate foo :" + this.foo);
		console.log("postCreate greeting :" + this.greeting);
		console.log("baz--"+this.baz.length+":"+this.baz[1]);
		var node = this.domNode;
		alert(node == this.hello);
		this.changeColor = dojo.partial(dojo.style,node,"background");
	},
	onMouseOver:function(evt){
//		console.log("onMouseOver");
		this.changeColor("yellow");
		console.log(evt)
	},
	onMouseOut:function(evt){
//		console.log("onMouseOut");
		this.changeColor("blue");
		console.log(evt)
	}
});